﻿@page "/student"
@using BlazorWebassemblyApp.DataModel
<h3>学生列表</h3>
<style>
    tr {
        height: 38px;
    }
</style>

<Button OnClick="@OpenWindow">滴滴滴，打开天窗说亮话</Button>

<Table TItem="Student" PageItemsSource="@PageItemsSource" OnQueryAsync="@OnQueryAsync" IsMultipleSelect="true" ShowSearch="true" ShowSearchText="false" SearchMode="SearchMode.Top" IsBordered="true" IsPagination="true" ShowToolbar="true" ShowAddButton="false" ShowEditButton="false" ShowRefresh="false" ShowDeleteButton="false" ShowColumnList="true" IsStriped="true" Height="800" IsFixedHeader="false" ShowLoading="true" AllowResizing="true" TableSize="TableSize.Compact">
    
    <TableColumns>
        @*<TableColumn @bind-Field="@context.Id" Width="30"  TextEllipsis="true"/>*@
        
        <TableColumn @bind-Field="@context.Id" Width="30"  TextEllipsis="true">
            <Template Context="value">
                <a href="/studentDetail/@value.Value">@value.Value</a>
            </Template>
        </TableColumn>

        <TableColumn @bind-Field="@context.Name" Width="30" Fixed="true" TextEllipsis="true" Visible=@IsShowColumn("Name")/>
        <TableColumn @bind-Field="@context.Age" Width="30" TextEllipsis="true"  Visible=@IsShowColumn("Age")/>
        <TableColumn @bind-Field="@context.Sex" Width="30" TextEllipsis="true"/>
        <TableColumn @bind-Field="@context.ClassName" Width="30" TextEllipsis="true"/>
        <TableColumn @bind-Field="@context.JoinDateTime" Width="180" TextEllipsis="true"/>
        <TableColumn @bind-Field="@context.Coutry" Width="30" TextEllipsis="true"/>
        <TableColumn @bind-Field="@context.Province" Width="30" TextEllipsis="true"/>
        <TableColumn @bind-Field="@context.City" Width="30" TextEllipsis="true"/>
        <TableColumn @bind-Field="@context.Address" Width="160" TextEllipsis="true"/>
    </TableColumns>

</Table>